package com.liuzh.deviceinfo.card;

import android.content.Context;
import android.os.Build.VERSION;
import android.util.AttributeSet;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.cardview.widget.CardView;
import c.h.a.m0.h;
import com.liuzh.deviceinfo.DeviceInfoApp;

public class SystemOverviewCard extends CardView {
    public SystemOverviewCard(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
        setUseCompatPadding(true);
        FrameLayout.inflate(getContext(), 2131492938, this);
        ImageView imageView = (ImageView) findViewById(2131296709);
        int i = VERSION.SDK_INT;
        imageView.setImageResource(h.b(i));
        TextView textView = (TextView) findViewById(2131297330);
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append(getResources().getString(2131689556));
        stringBuilder.append(" ");
        stringBuilder.append(VERSION.RELEASE);
        textView.setText(stringBuilder.toString());
        StringBuilder stringBuilder2;
        if (isInEditMode()) {
            i--;
            ((TextView) findViewById(2131297329)).setText(getResources().getStringArray(2130903041)[i]);
            textView = (TextView) findViewById(2131296832);
            stringBuilder2 = new StringBuilder();
            stringBuilder2.append(getResources().getString(2131690222));
            stringBuilder2.append(getResources().getStringArray(2130903040)[i]);
            textView.setText(stringBuilder2.toString());
            return;
        }
        String string;
        ((TextView) findViewById(2131297329)).setText(h.c(i));
        textView = (TextView) findViewById(2131296832);
        stringBuilder2 = new StringBuilder();
        stringBuilder2.append(getResources().getString(2131690222));
        i--;
        String[] stringArray = DeviceInfoApp.c.getResources().getStringArray(2130903040);
        if (i < 0 || i >= stringArray.length) {
            string = DeviceInfoApp.c.getString(2131690514);
        } else {
            string = stringArray[i];
        }
        stringBuilder2.append(string);
        textView.setText(stringBuilder2.toString());
    }
}
